package com.xuelang.pipeline.infrastructure.project.converter;

import com.xuelang.pipeline.domain.project.Project;
import com.xuelang.pipeline.infrastructure.project.dataobject.ProjectDO;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

/**
 * <p>项目实体与DO的转换类</p>
 *
 * @author : yixin.lys
 * @date : 2024-09-02 16:39
 **/
@Mapper
public interface ProjectToDOConverter {

    ProjectToDOConverter INSTANCE = Mappers.getMapper(ProjectToDOConverter.class);

    /**
     * 从实体转为DO
     * @param project
     * @return
     */
    ProjectDO toDO(Project project);

    /**
     * 从DO转为实体
     * @param projectDO
     * @return
     */
    Project fromDO(ProjectDO projectDO);
}
